package com.jsoft.test;

import com.jsoft.dao.TicketOpenDao;
import com.jsoft.dao.impl.TicketOpenDaoImpl;
import com.jsoft.entity.TicketOpen;
import org.junit.Test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author snkstart
 * @create 2023-02-21 19:39
 */
public class testTicketOpen {
    private TicketOpenDao ticketOpenDao=new TicketOpenDaoImpl();
    @Test
    public void testSave(){

        String str="2013-1-1";
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
        try {
            Date date = sdf.parse(str);
            TicketOpen ticketOpen = new TicketOpen("N20221001000004", "2", "3", 50000000.0, 2, date, date, "B", "B", "F64A3FA774552D70", "暂无备注");
            int res = ticketOpenDao.save(ticketOpen);
        } catch (ParseException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
